package models

import (
	"time"
)

type ShopCate struct {
	Id       int64     `form:"id" json:"id"`
	ParentId int64     `form:"parent_id" json:"parent_id"`
	Name     string    `form:"name" json:"name"`
	Created  time.Time `xorm:"created" json:"created"`
	Updated  time.Time `xorm:"updated" json:"updated"`
}

func (ShopCate) TableName() string {
	return "shop_cate"
}

type Shop struct {
	ShopId       int64     `form:"shop_id" json:"shop_id"`
	ScenicId    int64     `form:"scenic_id" json:"scenic_id"`
	CateId      int32     `form:"cate_id" json:"cate_id"`
	ProvinceCode int32     `form:"province_code" json:"province_code"`
	CityCode     int32     `form:"city_code" json:"city_code"`
	DistrictCode int32     `form:"district_code" json:"district_code"`
	Lon          float64   `form:"lon" json:"lon"`
	Lat          float64   `form:"lat" json:"lat"`
	Name         string    `form:"name" json:"name"`
	Photo        string    `form:"photo" json:"photo"`
	Tel          string    `form:"tel" json:"tel"`
	ProvinceName string    `form:"province_name" json:"province_name"`
	CityName     string    `form:"city_name" json:"city_name"`
	DistrictName string    `form:"district_name" json:"district_name"`
	Address      string    `form:"address" json:"address"`
	Created      time.Time `xorm:"created" json:"created"`
	Updated      time.Time `xorm:"updated" json:"updated"`
}

func (Shop) TableName() string {
	return "shop"
}

type ShopMore struct {
	Id          int64     `form:"id" json:"id"`
	ShopId      int64     `form:"shop_id" json:"shop_id"`
	Description string    `form:"description" json:"description"`
	Created     time.Time `xorm:"created" json:"created"`
	Updated     time.Time `xorm:"updated" json:"updated"`
}

func (ShopMore) TableName() string {
	return "shop_more"
}

type ShopContacts struct {
	Id          int64     `form:"id" json:"id"`
	ShopId      int64     `form:"shop_id" json:"shop_id"`
	Name        string    `form:"name" json:"name"`
	Email       string    `form:"email" json:"email"`
	Phone       string    `form:"phone" json:"phone"`
	Qq          string    `form:"qq" json:"qq"`
	Description string    `form:"description" json:"description"`
	QqIsWx      int16     `form:"qq_is_wx" js json:"qq_is_wx`
	PhoneIsWx   int16     `form:"phone_is_wx" json:"phone_is_wx"`
	Created     time.Time `xorm:"created" json:"created"`
	Updated     time.Time `xorm:"updated" json:"updated"`
}

func (ShopContacts) TableName() string {
	return "shop_contacts"
}
